#ifndef EXTREME_C_EXAMPLES_CHAPTER_7_2_GUN_H
#define EXTREME_C_EXAMPLES_CHAPTER_7_2_GUN_H

typedef int bool_t;

//类型前向声明
struct gun_t;

//内存分配
struct gun_t* gun_new();

//构造函数
void gun_ctor(struct gun_t*, int);

//析构函数
void gun_dtor(struct gun_t*);

//行为函数
bool_t gun_has_bullets(struct gun_t*);
void gun_trigger(struct gun_t*);
void gun_refill(struct gun_t*);

#endif